#include<stdio.h>
#include<errno.h>
#include<string.h>
#include<ctype.h>
int main()
{
	FILE* pf = fopen("text1.c", "r");
	if (pf == NULL)
	{
		printf("%s\n", strerror(errno));
	}
	return 0;
}


int main()
{
	int a = isspace(' ');
	printf("%d\n", a);
}


int main()
{
	int a = isdigit(12);
	printf("%d\n", a);
}

int main()
{
	printf("%c\n", tolower('A'));
	return 0;
}


int main()
{
	int arr1[] = { 1,2,3,4,5,6,7 };
	int arr2[10] = { 0 };
	memcpy(arr2, arr1, 28);
	float arr3[5] = { 1.0,2.0,3.0,4.0,5.0 };
	float arr4[10] = { 0.0 };
	memcpy(arr4, arr3, 20);
	return 0;
}
#include<assert.h>
my_memcpy(void* dest, const void* src, size_t num)
{
	assert(dest && src);
	void* ret = dest;
	while (num--)
	{
		
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return ret;
}
int main()
{
	int arr1[] = { 1,2,3,4,5,6,7 };
	int arr2[10] = { 0 };
	my_memcpy(arr2, arr1, 28);
	return 0;
}
#include<string.h>
#include<assert.h>
void* my_memcpy(void* dest, const void* src, size_t num)
{
	assert(dest && src);
	void* ret = dest;
	while (num--)
	{
		*(char*)dest = *(char*)src;
		dest=(char*)dest+1;
		src=(char*)src+1;
	}
	return ret;
}
int main()
{
	int arr1[] = { 1,2,3,4,5,6,7,8,9,10 };
	int arr2[20] = { 0 };
	//my_memcpy(arr2, arr1, 20);
	return 0;
}


void my_memmove(void*)
{

	void* ret = dest;
	if (dest < src)
	{
		while (num--)
		{
			*(char*)dest = *(char*)src;
			src = (char*)src + 1;
			dest = (char*)dest + 1;
		}
	}
	else
	{
		while (num--)
		{
			*((char*)dest + num) = *((char*)src + num);
		}
	}
}
